package asteroids.model.expressions;

import java.util.HashMap;
import asteroids.model.*;
/**
 * A subclass of expression (E) that represents a boolean
 * 
 * @version 1.0
 * 
 * @author	Thijs Peirelinck & Wouter Parys
 *
 */
public class BooleanLiteral extends BasicExpression {

	private boolean bool;
	
	public BooleanLiteral(boolean bool) {
		this.bool = bool;
	}
	
	public Boolean getValue() {
		return bool;
	}
	
	public boolean isValidExpression() {
		return true;
	}
	
	@Override
	public String getReturnType() {
		return "boolean";
	}
	
	@Override
	public String toString() {
		return "" + bool;
	}

	@Override
	public BooleanLiteral createCopy() {
		return new BooleanLiteral(this.bool);
	}
	
	@Override
	public void setExecuter(Ship executer) {
		//do nothing
	}
	
	@Override
	public void validate(HashMap<String, E> variables) {
		//do nothing
	}
}
